package com.bsc.rtc.lib.libraries.ProxyDemo.MoveProxy;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Proxy;

public class Client {
    public static void main(String[] args) {
        Person zhang=new Student("张三");

        InvocationHandler stuHandler=new StuInvocationHandler<Person>(zhang);

        Person stuProxy= (Person) Proxy.newProxyInstance(Person.class.getClassLoader(),new Class<?>[]{Person.class},stuHandler);

        stuProxy.giveMoney();
     }
}
